<?php
//声明文件解析的编码格式
	header('content-type:text/html;charset=utf-8');
	$link = @mysql_connect('localhost','root','');
if(!$link){
		die('数据库连接失败！');
	}
	mysql_query('set names utf8');
	mysql_query('use st');//recruit数据库
	
	$sql="select * from right_recruit ";//right_recruit表名
	
	
	 if(!empty($_GET['right_recruit'])){
            $dept=$_GET['right_recruit'];
            $sql="select * from right_recruit where dept = '{$dept}'";
        }//判断是否有值，如果有，就执行。没有就执行下一个

		$result = mysql_query($sql,$link);//执行上面的sql语句 
	   while ($row = mysql_fetch_assoc($result)) {
	   		$dept[]= $row;
	   }
	   
	
	define('APP', 'recruit');
	//加载HTML模板文件，显示数据
	require 'recruit_html.php';
?>